package com.lagou.feign;

import com.lagou.feign.impl.UserServiceImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @ClassName UserService
 * @Description
 * @Author playboy
 * @Date 2021/6/26 1:28 下午
 * @Version 1.0
 **/
@FeignClient(name = "lagou-service-user", path = "user", fallback = UserServiceImpl.class)
public interface UserService {


	@RequestMapping("/register/{email}/{password}/{code}")
	public boolean register(@PathVariable("email") String email,
							@PathVariable("password") String password,
							@PathVariable("code") String code);

	@RequestMapping("/isRegistered/{email}")
	public boolean isRegistered(@PathVariable("email") String email);

	@RequestMapping("/login/{email}/{password}")
	public String login(@PathVariable("email") String email,
						@PathVariable("password") String password);

	@RequestMapping("/info/{token}")
	public String info(@PathVariable("token") String token);

}
